package com.greendragon.persistence.dao.impl; 

import java.util.List;

import com.greendragon.persistence.dao.ILinkDao;
import com.greendragon.persistence.domain.Link;
import com.greendragon.persistence.enmu.FetchOrderType;


/** 
 * @author wulibin, exceptsky@gmail.com, 2011-9-8 下午11:24:59
 * 
 */
public class LinkDaoImpl extends BaseDao<Link> implements ILinkDao{

	@Override
	public List<Link> getByCategory(long cid, int offset, int length, FetchOrderType orderType){
		String hql = "from Link as l where l.category.id=?"+getOrderSql("l", orderType);
		return selectByPage(hql, new Long[]{new Long(cid)}, offset, length);
	}
}
 